From 6dd6d3c9d4a78b24dd50b2c17513d62010b57fb7 Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk[cl349]" Date: Thu, 5 May 2005 16:13:43 +0000 Subject: [PATCH] bitkeeper revision 1.1389.5.19 (427a4637g44Zsgumd50KMgMbI7bt2g) Remove __set_fixmap_ma and handle difference in installing machine-address and pseudo-physical-address fixmap entries inside __set_fixmap. fixmap.h, pgtable.c: Remove __set_fixmap_ma and handle difference in installing machine-address and pseudo-physical-address fixmap entries inside __set_fixmap. reboot.c, gnttab.c, ioremap.c: Change set_fixmap_ma call to set_fixmap call. init.c: Change set_fixmap_ma calls to set_fixmap calls and set_fixmap_ma_ro call to __set_fixmap(,, PAGE_KERNEL_RO) call. boot.c: Change __set_fixmap_ma calls to set_fixmap calls. Signed-off-by: Christian Limpach --- .../arch/xen/i386/kernel/acpi/boot.c | 7 +++--- .../arch/xen/i386/mm/init.c | 9 ++++---- .../arch/xen/i386/mm/ioremap.c | 2 +- .../arch/xen/i386/mm/pgtable.c | 22 +++++++++---------- .../arch/xen/kernel/gnttab.c | 6 +---- .../arch/xen/kernel/reboot.c | 4 ---- .../include/asm-xen/asm-i386/fixmap.h | 8 +------ 7 files changed, 22 insertions(+), 36 deletions(-) diff --git a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c index bf4e0a4986..d169b3c684 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c @@ -113,9 +113,8 @@ char *__acpi_map_table(unsigned long phys_addr, unsigned long size) j = PAGE_ALIGN(size) >> PAGE_SHIFT; for (i = 0; (i < FIX_ACPI_PAGES) && j ; i++, j--) { - __set_fixmap_ma(FIX_ACPI_END - i, - (phys_addr & PAGE_MASK) + (i << PAGE_SHIFT), - PAGE_KERNEL); + set_fixmap(FIX_ACPI_END - i, + (phys_addr & PAGE_MASK) + (i << PAGE_SHIFT)); } return (char *) __fix_to_virt(FIX_ACPI_END) + (phys_addr & ~PAGE_MASK); @@ -658,7 +657,7 @@ acpi_find_rsdp (void) if (!rsdp_phys) rsdp_phys = acpi_scan_rsdp (0xE0000, 0x20000); - __set_fixmap_ma(FIX_ACPI_RSDP_PAGE, rsdp_phys, PAGE_KERNEL); + set_fixmap(FIX_ACPI_RSDP_PAGE, rsdp_phys); return rsdp_phys; } diff --git a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c index 860c2060be..e3a588e029 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c @@ -562,7 +562,7 @@ void __init paging_init(void) zone_sizes_init(); /* Switch to the real shared_info page, and clear the dummy page. */ - set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info); + set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info); HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO); memset(empty_zero_page, 0, sizeof(empty_zero_page)); @@ -570,10 +570,11 @@ void __init paging_init(void) /* Setup mapping of lower 1st MB */ for (i = 0; i < NR_FIX_ISAMAPS; i++) if (xen_start_info.flags & SIF_PRIVILEGED) - set_fixmap_ma(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE); + set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE); else - set_fixmap_ma_ro(FIX_ISAMAP_BEGIN - i, - virt_to_machine(empty_zero_page)); + __set_fixmap(FIX_ISAMAP_BEGIN - i, + virt_to_machine(empty_zero_page), + PAGE_KERNEL_RO); #endif } diff --git a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c index 7e58a230fc..86a3672e33 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c @@ -256,7 +256,7 @@ void __init *bt_ioremap(unsigned long phys_addr, unsigned long size) */ idx = FIX_BTMAP_BEGIN; while (nrpages > 0) { - set_fixmap_ma(idx, phys_addr); + set_fixmap(idx, phys_addr); phys_addr += PAGE_SIZE; --idx; --nrpages; diff --git a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c index 7a586cab7e..59399cceff 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c @@ -176,18 +176,18 @@ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags) BUG(); return; } - set_pte_pfn(address, phys >> PAGE_SHIFT, flags); -} - -void __set_fixmap_ma (enum fixed_addresses idx, unsigned long phys, pgprot_t flags) -{ - unsigned long address = __fix_to_virt(idx); - - if (idx >= __end_of_fixed_addresses) { - BUG(); - return; + switch (idx) { + case FIX_WP_TEST: + case FIX_VSYSCALL: +#ifdef CONFIG_X86_F00F_BUG + case FIX_F00F_IDT: +#endif + set_pte_pfn(address, phys >> PAGE_SHIFT, flags); + break; + default: + set_pte_pfn_ma(address, phys >> PAGE_SHIFT, flags); + break; } - set_pte_pfn_ma(address, phys >> PAGE_SHIFT, flags); } pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) diff --git a/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c b/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c index 0ae2ac6548..69293cdb73 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c @@ -20,10 +20,6 @@ #include #include -#ifndef set_fixmap_ma -#define set_fixmap_ma set_fixmap -#endif - #if 1 #define ASSERT(_p) \ if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \ @@ -339,7 +335,7 @@ int gnttab_resume(void) BUG_ON(setup.status != 0); for ( i = 0; i < NR_GRANT_FRAMES; i++ ) - set_fixmap_ma(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT); + set_fixmap(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT); return 0; } diff --git a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c index 6461610201..bca2a7de53 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c @@ -129,11 +129,7 @@ static void __do_suspend(void) memcpy(&xen_start_info, &suspend_record->resume_info, sizeof(xen_start_info)); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info); -#else set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info); -#endif HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO); diff --git a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h index c79f8a94a0..2bd859ff5f 100644 --- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h +++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h @@ -104,20 +104,14 @@ enum fixed_addresses { extern void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags); -extern void __set_fixmap_ma (enum fixed_addresses idx, - unsigned long mach, pgprot_t flags); #define set_fixmap(idx, phys) \ __set_fixmap(idx, phys, PAGE_KERNEL) -#define set_fixmap_ma(idx, phys) \ - __set_fixmap_ma(idx, phys, PAGE_KERNEL) -#define set_fixmap_ma_ro(idx, phys) \ - __set_fixmap_ma(idx, phys, PAGE_KERNEL_RO) /* * Some hardware wants to get fixmapped without caching. */ #define set_fixmap_nocache(idx, phys) \ - __set_fixmap_ma(idx, phys, PAGE_KERNEL_NOCACHE) + __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE) #define clear_fixmap(idx) \ __set_fixmap(idx, 0, __pgprot(0)) -- 2.30.2